package service.impl;

import dao.ProductDao;
import dao.impl.ProductDaoImpl;
import entity.Product;
import service.ProductService;
import java.util.List;

public class ProductServiceImpl implements ProductService {
    private static ProductDao productDao = new ProductDaoImpl(Product.class);

    @Override
    public Product getById(String id) {
        return productDao.getById(id);
    }

    @Override
    public List<Product> list() {
        return productDao.list();
    }

    @Override
    public void update(Product product) {
        productDao.updateById(product);
    }

    @Override
    public void remove(Product product) {
        productDao.deleteById(product);
    }
}